<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动布局1</title>
</head>
<style>
    .box {
        width: 1200px;
        height: 460px;
        background-color: red;
        margin: 0 auto; /* 居中显示 */
    }

    .left {
        float: left;
        width: 230px;
        height: 460px;
        background-color: purple;
    }

    .right {
        float: right;
        width: 970px;
        height: 460px;
        background-color: skyblue;
    }

</style>
<body>
    <div class="box">
        <div class="left">左侧</div>
        <div class="right">右侧</div>
    </div>
</body>
</html>